package com.logic.landseaserver.ws.dto;

import com.logic.landseaserver.domain.PreOffrentDetailBill;

import java.util.Date;

/**
 * Created by Junny on 2017/8/24.
 */
public class PreBillDetailDTO {
    private Integer id;

    private Integer prebillId;

    private String preType;

    private Double consumption;

    private Double billAmount;

    private Date dateBegin;

    private Date dateEnd;

    private Boolean couponFlag;

    private String comments;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPrebillId() {
        return prebillId;
    }

    public void setPrebillId(Integer prebillId) {
        this.prebillId = prebillId;
    }

    public String getPreType() {
        return preType;
    }

    public void setPreType(String preType) {
        this.preType = preType;
    }

    public Double getConsumption() {
        return consumption;
    }

    public void setConsumption(Double consumption) {
        this.consumption = consumption;
    }

    public Double getBillAmount() {
        return billAmount;
    }

    public void setBillAmount(Double billAmount) {
        this.billAmount = billAmount;
    }

    public Date getDateBegin() {
        return dateBegin;
    }

    public void setDateBegin(Date dateBegin) {
        this.dateBegin = dateBegin;
    }

    public Date getDateEnd() {
        return dateEnd;
    }

    public void setDateEnd(Date dateEnd) {
        this.dateEnd = dateEnd;
    }

    public Boolean getCouponFlag() {
        return couponFlag;
    }

    public void setCouponFlag(Boolean couponFlag) {
        this.couponFlag = couponFlag;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public static PreBillDetailDTO convertPojoToDto(PreOffrentDetailBill pojo) {
        PreBillDetailDTO dto = new PreBillDetailDTO();
        dto.setId(pojo.getId());
        dto.setPrebillId(pojo.getPrebillId());
        dto.setPreType(pojo.getPreType());
        dto.setBillAmount(pojo.getBillAmount());
        dto.setConsumption(pojo.getConsumption());
        dto.setDateBegin(pojo.getDateBegin());
        dto.setDateEnd(pojo.getDateEnd());
        dto.setCouponFlag(pojo.getCouponFlag());
        dto.setComments(pojo.getComments());
        return dto;
    }
}
